package com.tanhua.manage.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tanhua.manage.mapper.UserInfoMapper;
import com.tanhua.manage.pojo.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserInfoService_six {

    @Autowired
    private UserInfoMapper userInfoMapper;

    public UserInfo queryUserInfoById(Long id){
        QueryWrapper<UserInfo> query = new QueryWrapper<>();
        query.eq("user_id",id);
        return this.userInfoMapper.selectOne(query);
    }



    public IPage<UserInfo> queryUserInfoList(Integer page, Integer pageSize, QueryWrapper<UserInfo> queryWrapper) {
        Page<UserInfo> pager = new Page<>(page, pageSize);
        return this.userInfoMapper.selectPage(pager,queryWrapper);
    }
}
